<template>
    <div class="home-box">
        <!-- 首页分类列表 start -->
        <div v-for="(type, index) in homeData" :key="index">
            <div class="list-name">
                <span>{{ type.typeName }}</span>
                <span class="list-more" @click=" $root.$emit('changePage','FilmPage') ">更多 > </span>
            </div>
            <film-list class="list-content" :list="type.list"></film-list>
        </div>
        <!-- 首页分类列表 end -->
    </div>
</template>
<script src="../datas/home.js"></script>
<script>
    Vue.component("HomePage", {
        template: document.currentScript.ownerDocument.querySelector("template"),
        data(){
            return {
                homeData:homeData.result
            }
        },
    })
</script>